<?php
namespace  app\common\validate;

use think\Validate;
class ProjectWeekly extends Validate {
    protected $rule = [
        //'name'=>'length:4,25' duration finance  project_progress week_work quality_control
        'weekly_info'  =>  'require|length:10,1000', //项目概况
      //  'duration'  =>  'require|length:10,1000', //项目工期
        'finance'  =>  'require|length:10,1000', //项目财务信息
        'project_progress'  =>  'require|length:10,1000', //项目进展
        'week_work'  =>  'require|length:10,1000', //下周计划
        'quality_control'  =>  'require|length:10,1000', //质量管控
    ];
    
    protected $message = [
        'weekly_info.require'  =>  '项目概况必须填写',
        //'duration.require' =>  '项目工期必须填写',
        'finance.require'  =>  '项目财务必须填写',
        'project_progress.require' =>  '项目进展必须填写',
        'week_work.require'  =>  '下周计划必须填写',
        'quality_control.require' =>  '质量管控必须填写',

        'weekly_info.length'  =>  '项目概况长度10-1000',
       // 'duration.length' =>  '项目工期长度10-1000',
        'finance.length'  =>  '项目财务长度10-1000',
        'project_progress.length' =>  '项目进展长度10-1000',
        'week_work.length'  =>  '下周计划长度10-1000',
        'quality_control.length' =>  '质量管控长度10-1000',
    ];
    
    protected $scene = [
        'add'   =>  ['weekly_info','duration','finance','project_progress','week_work','quality_control'],
        'edit'   =>  ['weekly_info','duration','finance','project_progress','week_work','quality_control']
       
    ];
}